package fina2.dcs.fis;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
@SuppressWarnings("serial")
public class MMBankGroupPk implements Serializable {
	private float bankId;
	private float bankGroupId;

	public MMBankGroupPk() {

	}

	public MMBankGroupPk(float bankId, float bankGroupId) {
		this.bankId = bankId;
		this.bankGroupId = bankGroupId;
	}

	@Column(name = "BANKID")
	public float getBankId() {
		return bankId;
	}

	public void setBankId(float bankId) {
		this.bankId = bankId;
	}

	@Column(name = "BANKGROUPID")
	public float getBankGroupId() {
		return bankGroupId;
	}

	public void setBankGroupId(float bankGroupId) {
		this.bankGroupId = bankGroupId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + Float.floatToIntBits(bankGroupId);
		result = prime * result + Float.floatToIntBits(bankId);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MMBankGroupPk other = (MMBankGroupPk) obj;
		if (Float.floatToIntBits(bankGroupId) != Float.floatToIntBits(other.bankGroupId))
			return false;
		if (Float.floatToIntBits(bankId) != Float.floatToIntBits(other.bankId))
			return false;
		return true;
	}

}
